package com.ruoyi.business.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.business.domain.CourseUser;
import com.ruoyi.business.mapper.CourseUserMapper;
import com.ruoyi.business.service.ICourseUserService;
import org.springframework.stereotype.Service;

/**
 * @author 最爱喝兽奶
 * @create 2022/9/15
 **/
@Service
public class CourseUserServiceImpl extends ServiceImpl<CourseUserMapper, CourseUser> implements ICourseUserService {


    @Override
    public Long selectCountByCourseId(String id) {
        QueryWrapper<CourseUser> wrapper = new QueryWrapper<>();
        wrapper.eq("course_id", id);
        Long count = baseMapper.selectCount(wrapper);

        return count;
    }
}
